<template>
	<view>
		<view class="ulist">
			<view class="item" v-for="(item,index) in list" :key="index">
				<image :src="item.logo?item.logo:'/static/toux.png'" mode=""></image>
				<view class="flex_r">
					<view class="t1">{{item.shopName}}</view>
					<view class="">
						<view class="t2">加入时间</view>
						<view class="t3">{{item.createTime}}</view>
					</view>
				</view>
			</view>
		</view>
		<view class="kong" v-if="nolist">
			<view class="">
				<image src="/static/user/k.png" mode=""></image>
				<view class="ts">
					尚无数据
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		userList
	} from '@/common/http.api.js';
	export default {
		data() {
			return {
				params:{
					pageNum: 1,
					pageSize: 15
				},
				list:[],
				nolist:false,
			};
		},
		onLoad() {
			this.getList()
		},
		onReachBottom() {
			this.params.pageNum ++
			this.getlist()
		},
		methods:{
			getList(){
				userList(this.params).then(res=>{
					this.list.push(...res.rows)
					let total = Math.ceil(res.total / this.params.pageSize);
					this.nolist = total == 0
				})
			},
			
		}
	}
</script>

<style lang="scss">
	.kong {
		width: 100%;
		margin: 230rpx auto;
		display: flex;
		align-items: center;
		justify-content: center;
		text-align: center;

		image {
			width: 228rpx;
			height: 228rpx;
		}

		.ts {
			font-family: PingFang SC, PingFang SC;
			font-weight: bold;
			font-size: 36rpx;
			color: #000000;
			margin-top: 20rpx;
		}
	}
	.ulist{
		padding: 20rpx ;
		box-sizing: border-box;
		.item{
			display: flex;
			align-items: center;
			border-bottom: 1px solid #eee;
			margin: 20rpx auto;
			padding-bottom: 20rpx;
			image{
				width: 80rpx;
				height: 80rpx;
				border-radius: 40rpx;
			}
			.flex_r{
				flex: 1;
				margin-left: 20rpx;
				display: flex;
				align-items: center;
				justify-content: space-between;
			}
			.t1{
				font-family: PingFang SC, PingFang SC;
				font-weight: bold;
				font-size: 32rpx;
				color: #000000;
			}
			.t2{
				font-family: PingFang SC, PingFang SC;
				font-weight: 500;
				font-size: 28rpx;
				color: #000000;
				text-align: right;
			}
			.t3{
				font-weight: 500;
				font-size: 28rpx;
				color: #979797;
			}
		}
	}
</style>